package com.boyunv.bridge.example02;/*
 *@description
 * 支付渠道1:微信
 *@author boyunv
 *@create 2023/7/13 23:26
 *@version 1.0
 */

import java.math.BigDecimal;

public class WxPay extends Pay{
    public WxPay(IPayMode payMode) {
        super(payMode);
    }

    public String transfer(String uId, String tradeId, BigDecimal amount) {
        System.out.println("微信支付渠道划账开始.................");
        boolean security = payMode.security(uId);
        System.out.println("微信渠道支付风险校验:"+uId+","+tradeId+","+security);
        if (!security){
            System.out.println("微信渠道支付失败:");
            return "500";
        }
        System.out.println("微信渠道支付成功!金额:"+amount);

        return "200";
    }
}
